package com.sg.hms.ServiceImpl;

import java.util.List;

import com.sg.hms.Dao.FoodDao;
import com.sg.hms.DaoImpl.FoodDaoImpl;
import com.sg.hms.Model.Food;
import com.sg.hms.Model.F_PageBean;
import com.sg.hms.Service.FoodService;

public class FoodServiceImpl implements FoodService{
	FoodDao fdao=new FoodDaoImpl();
	@Override
	public List<Food> findFood(int elID,F_PageBean pageBean) {
		
		return fdao.findFood(elID,pageBean.getStart(),pageBean.getPageSize());
	}
	@Override
	public List<Food> findFood(int elId, String searchName) {
		// TODO Auto-generated method stub
		return fdao.findFood(elId, searchName);
	}
	@Override
	public int countFood(int elId) {
		// TODO Auto-generated method stub
		return fdao.countFood(elId);
	}
	@Override
	public int addFood(int elId, String fNmae, int weight) {
		// TODO Auto-generated method stub
		return fdao.addFood(elId, fNmae, weight);
	}
	@Override
	public int deleteFood(int elId, int foId) {
		// TODO Auto-generated method stub
		return fdao.deleteFood(elId, foId);
	}
	@Override
	public int updateFood(int foId,String fName,int weight) {
		// TODO Auto-generated method stub
		return fdao.updateFood(foId, fName, weight);
	}


}
